/*-----------------------------------------------------------------------------
 * @file   hal_led.h
 * @brief  interface for led module operations
 * @author WLH<wanglehui8357@163.com> Copyright (C) 2021~2099.
-----------------------------------------------------------------------------*/
#ifndef HAL_LED_H
#define HAL_LED_H

#include "globaldef.h"

BEGIN_DECLS

/*-----------------------------------------------------------------------------
 * Predefine LED ID number
-----------------------------------------------------------------------------*/
#define HAL_LED0     0x00u
#define HAL_LED1     0x01u
#define HAL_LED2     0x02u
#define HAL_LED3     0x03u
#define HAL_LED_ALL  0xAAu
#define HAL_LED_NULL 0xFFu

/*------------------------------------------------------------------------------
 * public functions declaration
------------------------------------------------------------------------------*/
/**
 * @brief get the count of led supported
 */
U8 hal_led_count(void);
/**
 * @brief init led module
 */
void hal_led_init(void);
/**
 * @brief turn on the special led
 * @param[in]  led   The led identification number
 */
void hal_led_on(U8 led);
/**
 * @brief turn on the special led
 * @param[in]  led   The led identification number
 */
void hal_led_off(U8 led);
/**
 * @brief toggle the state of special led
 * @param[in]  led   The led identification number
 */
void hal_led_toggle(U8 led);

END_DECLS

#endif //~HAL_LED_H
